package servlet;

import com.google.gson.Gson;
import dao.DB;
import service.UserService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

@WebServlet("/selepagenotes")
public class selePagenotes extends HttpServlet {


    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String uid =req.getParameter("uid");
        String fid =req.getParameter("fid");

        UserService userSer =new UserService();
        List tmp = userSer.getPagemeotes(uid,fid);

        resp.getWriter().print(new Gson().toJson(tmp));
//        resp.getWriter().print(new Gson().toJson(tmp2));


    }
}
